﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Model;

namespace TakeoutMangesDAL
{
    public class OrderInfoDAL
    {
        public static int InsertOrderInfo(Model.OrderInfo OI)
        {
            string sqlstr = "insert into Orders values(@OrderDate,@OrderState,@OrderInfoID,@UserID,@Remark,@Isdelete)";
            SqlParameter[] pams = new SqlParameter[]
            {
                new SqlParameter("@OrderDate",OI.OrderDate),
                new SqlParameter("@OrderState",OI.OrderState),
                new SqlParameter("@OrderInfoID",OI.OrderInfoID),
                new SqlParameter("@UserID",OI.UserID),
                new SqlParameter("@Remark",OI.Remark),
                new SqlParameter("@Isdelete",OI.Isdelete),
            };
            return DBHelper.ExecuteNonQuery(sqlstr, pams);
        }
    }
}
